{include_core file="m/lib/header.html" title="第三方人员查询订单"}
<link rel="stylesheet" href="{$smarty.const.STATIC_URL}/css/baobao-main.css">
<script type="text/javascript">
     ~function () {
        // Gets a high and sets the visual window
        var width = document.getElementsByTagName('html')[0].getBoundingClientRect().width,
                fontSize = document.getElementsByTagName("html")[0];
                if(width> 750){
                    width=750;
                }
        fontSize.style.fontSize = width * 0.05 + "px";
    }()
</script>

<div class="warp">
    <div class="logo">
        <div class="logo_img">
            <img src="{$smarty.const.STATIC_URL}/images/logo.png" alt="logo">
        </div>
    </div>
    <form action="{$smarty.const.SITE_URL}/order/m/order_query.html" method="post" role="form" onsubmit="return validateForm();">
        <div class="query">
            <span>订单查询：</span>
            <input type="tel" class="query_num" id="num" name="order_no" placeholder="请输入你要查询的订单号">
        </div>
        <div class="query">
            <span>手机号码：</span>
            <input type="tel" name="phone_num" class="query_num" id="telValue" placeholder="请输入你的手机号">
        </div>
         <input type="submit" class="sub_btn" value="确定">
    </form>

<!--<div class="btn">
        <a href="javascript:void(0);">确定</a>
 </div> -->
</div>

<script type="text/javascript">

    function validateForm(){
        var numValue=document.getElementById("num").value;
        var telValue=document.getElementById("telValue").value;
        {literal}
        var numReg=/^[0-9]+$/;
        var telReg=/^(0|86|17951)?(13[0-9]|15[0-9]|17[6-8]|18[0-9]|14[57])[0-9]{8}$/;
        if(numValue==""){
            alert("输入单号不能为空")
            return false
        }else if(!numReg.test(numValue)){
            alert("单号只能输入数字")
            return false
        }else{
            // alert("单号已提交")
        }

        if(telValue==""){
            alert("输入手机号不能为空")
            return false
        }else if(!telReg.test(telValue)){
            alert("输入正确的手机号")
            return false
        }else{
            // alert("手机号已提交")
        }
        {/literal}
        
    return true
    }
    
    {if $is_error}
    alert("{$error_info}");
    {/if}
</script>
</body>
</html>